package com.enlink.didu.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 功能权限表-IDEA
 * </p>
 *
 * @author idea
 * @since 2017-01-01
 */
public class IdeaMenu extends Model<IdeaMenu> {

    private static final long serialVersionUID = 1L;

    /**
     * 功能ID
     */
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Integer menuId;

    /**
     * 父菜单ID，一级菜单为0
     */
    private Integer parentId;

    /**
     * 菜单名称
     */
    @TableField("`name`")
    private String name;

    /**
     * 菜单URL
     */
    private String url;

    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    private String perms;

    /**
     * 类型；0-目录; 1-菜单; 2-按钮
     */
    @TableField("`type`")
    private Integer type;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 排序；值越小越靠前
     */
    private Integer orderNum;

    /**
     * 状态；1-有效; 0-无效
     */
    @TableField("`status`")
    private Integer status;


    public Integer getMenuId() {
        return menuId;
    }

    public IdeaMenu setMenuId(Integer menuId) {
        this.menuId = menuId;
        return this;
    }

    public Integer getParentId() {
        return parentId;
    }

    public IdeaMenu setParentId(Integer parentId) {
        this.parentId = parentId;
        return this;
    }

    public String getName() {
        return name;
    }

    public IdeaMenu setName(String name) {
        this.name = name;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public IdeaMenu setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getPerms() {
        return perms;
    }

    public IdeaMenu setPerms(String perms) {
        this.perms = perms;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public IdeaMenu setType(Integer type) {
        this.type = type;
        return this;
    }

    public String getIcon() {
        return icon;
    }

    public IdeaMenu setIcon(String icon) {
        this.icon = icon;
        return this;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public IdeaMenu setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public IdeaMenu setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public static final String MENU_ID = "menu_id";

    public static final String PARENT_ID = "parent_id";

    public static final String NAME = "name";

    public static final String URL = "url";

    public static final String PERMS = "perms";

    public static final String TYPE = "type";

    public static final String ICON = "icon";

    public static final String ORDER_NUM = "order_num";

    public static final String STATUS = "status";

    @Override
    protected Serializable pkVal() {
        return this.menuId;
    }

    @Override
    public String toString() {
        return "IdeaMenu{" +
        "menuId=" + menuId +
        ", parentId=" + parentId +
        ", name=" + name +
        ", url=" + url +
        ", perms=" + perms +
        ", type=" + type +
        ", icon=" + icon +
        ", orderNum=" + orderNum +
        ", status=" + status +
        "}";
    }
}
